package com.zds.support.api.retrofit.response

import android.text.TextUtils
import com.google.gson.annotations.SerializedName
import java.io.Serializable

open class ApiBaseResponse : Serializable {
    @SerializedName("code")
    var code: String = ""

    @SerializedName("msg", alternate = arrayOf("message"))
    var msg: String = ""

    var reponseTime: Long = 0L
    fun isSuccess(): Boolean {
        return TextUtils.equals(code, "success") || TextUtils.equals(code, "Success") || TextUtils.equals(code, "200")
    }

    override fun toString(): String {
        return "ApiBaseResponse(code=$code, msg='$msg')"
    }


}